import {emit} from 'network/request.js'
export function addLike(json){
    console.log('post',json);
  return emit({
    method:"post",
    url:'/addLike',
    headers:{
      'content-type':'application/json'  //如果写成contentType会报错
    },
    data:json
  })
}

export function getAllLike(id){
  return emit({
    method:"get",
    url:'/getAllLike',
    headers:{
      'content-type':'application/json'  //如果写成contentType会报错
    },
    params:{
      id
    }
  })
}

export function deleteLike(userId,goodId){
  return emit({
    method:"get",
    url:'/deleteLike',
    headers:{
      'content-type':'application/json'  //如果写成contentType会报错
    },
    params:{
      userId,goodId
    }
  })
}
